package com.yfp.machine.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 机器dto
 *
 *
 * @date 2024/01/22
 */
@Schema(title = "设备信息")
@Data
public class MachineDto implements Serializable {
    private static final long serialVersionUID = -51701326328911805L;
    //机器id
    @Schema(title = "机器id")
    private String machineId;
    //公司id
    @Schema(title = "公司id")
    private String companyId;
    @Schema(title = "公司名称")
    private String companyName;
    //区域id
    @Schema(title = "区域id")
    private String areaId;
    @Schema(title = "区域名称")
    private String areaName;

    //线路id
    @Schema(title = "线路id")
    private String routeId;
    @Schema(title = "线路名称")
    private String routeName;
    //点位id
    @Schema(title = "点位id")
    private String positionId;
    @Schema(title = "点位名称")
    private String positionName;
    @Schema(title = "点位类型名称")
    private String positionTypeName;


    //设备类型（1：二代机  2：三代机）
    @Schema(title = "设备类型（1：二代机  2：三代机）")
    private Integer machineType;
    //设备名称
    @Schema(title = "设备名称")
    private String machineName;
    //维修负责人userid
    @Schema(title = "维修负责人userid")
    private String serviceContracts;
    //维修负责人姓名
    @Schema(title = "维修负责人姓名")
    private String serviceName;
    //维修负责人电话
    @Schema(title = "维修负责人电话")
    private String servicePhone;
    @Schema(title = "设备标签")
    private String machineTag;

    @Schema(title = "设备编号")
    private String machineSn;

    @Schema(title = "备注")
    private String remark;

    @Schema(title = "设备标签id")
    private String machineTagId;


    //设备投放时间
    @Schema(title = "设备投放时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date operationTime;
    //投放地址
    @Schema(title = "投放地址")
    private String positionAddr;
    //经度
    @Schema(title = "经度")
    private String longitude;
    //纬度
    @Schema(title = "纬度")
    private String latitude;
    //冷藏温度
    @Schema(title = "冷藏温度")
    private String temperature;
    //开门检测（正常1/异常0）
    @Schema(title = "开门检测（正常1/异常0）")
    private Integer openDoorCheck;
    //关门检测（正常1/异常0）
    @Schema(title = "关门检测（正常1/异常0）")
    private Integer closeDoorCheck;
    //出餐检测（正常1/异常0）
    @Schema(title = "出餐检测（正常1/异常0）")
    private Integer outMealCheck;
    //取餐检测（正常1/异常0）
    @Schema(title = "取餐检测（正常1/异常0）")
    private Integer takeMealCheck;
    //设备电量
    @Schema(title = "设备电量")
    private String kwh;
    //运营状态（1：运营中，2：休息中 3：故障中 4: 补货）
    @Schema(title = "运营状态（1：运营中，2：休息中 3：故障中 4: 补货）")
    private Integer operationStatus;
    //启用1/禁用0
    @Schema(title = "启用1/禁用0")
    private Integer enable;
    //固件版本
    @Schema(title = "固件版本")
    private String firmwareVersion;
    //app版本
    @Schema(title = "app版本")
    private String appVersion;
    //app版本名称
    @Schema(title = "app版本名称")
    private String appVersionName;
    //主广告id
    @Schema(title = "主广告id")
    private String masterAdId;
    //副广告id
    @Schema(title = "副广告id")
    private String secondaryAdId;
    //VMC连接状态
    @Schema(title = "VMC连接状态")
    private String vmcStatus;
    //创建时间
    @Schema(title = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 创建操作人
     */
    @Schema(title = "创建操作人")
    private String createOper;

    @Schema(title = "支付类型")
    private Integer payType;

    /**
     * 机器模型
     */
    @Schema(title = "机器模型")
    private String machineModel;

    /**
     * 套餐总计
     */
    @Schema(title = "现套餐总计")
    private String comboTotal;

    /**
     * 销售额
     */
    @Schema(title = "销售额")
    private String salesAmount;

    @Schema(title = "设备库存告警")
    private boolean inventoryAlarm;

    @Schema(title = "设备库存阈值")
    private String threshold;

    @Schema(title = "在线状态 0-离线 1-在线")
    private Integer onlineStatus;

    @Schema(title = "营业开始时间")
    private String saleBeginTime;
    @Schema(title = "营业结束时间")
    private String saleEndTime;


    @Schema(title = "设备离线时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date offlineUpdateTime;

    @Schema(title = "离线时长")
    private String offlineDuration = "0";

    /**
     * 温度上报频率
     */
    private Integer tempFrequency;

    /**
     * 摄像头序列号
     */
    @Schema(title = "摄像头序列号")
    private String serialNumber;

    // 客服在线状态
    @Schema(title = "客服在线状态0-离线 1-在线")
    private Integer operationalOnlineStatus;

    @Schema(description = "点位标签 1特殊 2普通")
    private Integer label;


}